package com.yunyao.framework.service;

import com.yunyao.common.dto.*;
import com.yunyao.common.dto.excel.InvoiceExcelDto;
import com.yunyao.common.dto.project.ProjectDto;
import com.yunyao.common.dto.supplier.SupplierSettlementDto;
import com.yunyao.common.web.util.PageResult;
import com.yunyao.common.web.util.YResult;
import com.yunyao.dao.model.BamuReconciliationSettlement;
import com.yunyao.framework.dto.invoice.InvoiceConfirmDto;
import com.yunyao.framework.dto.reconciliation.ReconciliationConfirmDto;
import com.yunyao.framework.vo.Invoice.*;
import com.yunyao.framework.vo.project.ProjectSettlementVO;
import com.yunyao.framework.vo.project.ProjectVO;
import com.yunyao.framework.vo.reconciliation.ReconciliationOrderVO;
import com.yunyao.framework.vo.supplier.SupplierSettlementVO;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.List;

@Validated
public interface SoInvoiceService {
    /**
     * 获取项目发票列表
     *
     * @param invoiceDto
     * @return
     */
    YResult<PageResult<InvoiceVO>> pageList(InvoiceDto invoiceDto);

    YResult<PageResult<SupplierSettlementVO>> pageSementList(SupplierSettlementDto supplierSettlementDto);

    /**
     * 根据Id获取项目发票信息
     *
     * @param id
     * @return
     */
    YResult<InvoiceinfoVO> getInvoiceById(Long id);

    /**
     * 保存项目项目发票信息
     *
     * @param saveDto
     * @return
     */
    YResult<String> saveInfo(InvoiceDto saveDto);

    YResult<String> saveInvoice(InvoiceDto saveDto);

    /**
     * 获取项目发票列表
     *
     * @param invoiceDto
     * @return
     */
    YResult<PageResult<InvoiceVO>> pageInvoiceList(InvoiceDto invoiceDto);


    YResult<PageResult<ReconciliationOrderVO>> pageProjectList(InvoiceDto invoiceDto);

    YResult<PageResult<ReconciliationOrderVO>> pageProjectList2(InvoiceDto invoiceDto);

    YResult<PageResult<ReconciliationOrderVO>> pageProjectList3(InvoiceDto invoiceDto);

    YResult<InvoiceCountVO> getcount(Long id);

    YResult<String> saveProject(ProjectDto saveDto);

    YResult<PageResult<InvoiceSourceOrderVO>> getInvoiceSourceOrderById(InvoiceSourceOrderDto invoiceSourceOrderDto);

    YResult<PageResult<InvoiceSourceOrderVO>> getInvoiceSourceOrderBycontractId(InvoiceSourceOrderDto invoiceSourceOrderDto);

    YResult<PageResult<InvoiceSourceVO>> getInvoiceSourceById(InvoiceSourceDto invoiceSourceDto);


    YResult<String> saveBindId(InvoiceDto saveDto);

    YResult<String> redInvoice(InvoiceDto saveDto);

    YResult<String> saveStatus(InvoiceDto saveDto);

    YResult<String> ycconfirm(InvoiceConfirmDto invoiceConfirmDto);

    /**
     * 关联发票列表
     *
     * @param dto
     * @return
     */
    PageResult<InvoiceVO> findByTypeList(@Valid @NotNull InvoiceTypeDto dto);

    /**
     * 关联发票接口
     *
     * @param dto
     * @return
     */
    boolean relationInvoice(@Valid @NotNull RelationInvoiceDto dto);

    List<InvoiceExcelDto> export(InvoiceDto invoiceDto);
}
